<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>W8X代码重构</title>
    <link rel="stylesheet" href="../src/css/layui.css" th:href="@{/layui/css/layui.css}">
    <script src="/js/jquery-3.3.1.min.js" th:src="@{/js/jquery-3.3.1.min.js}"></script>
</head>
<style>
    .in {
        position: absolute;
        left: 50%;
        top: 50%;
        height: 300px;
        width: 600px;
        margin: -150px 0 0 -300px;
    }

    .scanPanl {
        height: 50%;
        width: 80%;
        display: flex;
        flex-direction: column;
        margin-top: 50px;
    }
</style>
<body style="background-color: #2D93CA">
<div class="in layui-card">
    <div class="layui-card-header">扫描框</div>
    <div class="layui-card-body"
         style="display: flex;flex-direction: column;align-items: center;height: 100%;width: 100%;">
        <div class="scanPanl">
            <h1 style="margin-bottom: 10px;">W8X</h1>
            <div class="layui-form">
                <input type="text" id="filePath" name="title" lay-verify="title" autocomplete="off" placeholder="输入项目路径"
                       class="layui-input" style="width: 70%;float: left;">
                <button class="layui-btn layui-btn-normal" style="margin-left: 10px;" onclick="sendRequest()">扫描项目代码
                </button>
            </div>
        </div>
    </div>
</div>
<script src="../src/layui.js" th:src="@{/layui/layui.js}"></script>
<script src="../src/layui.js" th:src="@{/js/me.js}"></script>
<script>
    $(document).ready(function () {
        layui.use('layer', function () { //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer;
        });
    });

    function sendRequest() {
        let path = $("#filePath").val()
        scanner(path);
    }
</script>
</body>
</html>